#!/bin/sh
# create device node
mknod /dev/console c 5 1
mknod /dev/ttyAMA0 c 204 64
mknod /dev/ttyAMA1 c 204 65
mknod /dev/ttyS000 c 204 64
mknod /dev/null c 1 3

mkdir /dev/pts
mount -t devpts devpts /dev/pts
mkdir -p /dev/snd
mkdir -p /dev/.udev
mdev -s

# config local network
ifconfig lo 127.0.0.1 up

# start OHOS services
mknod /dev/hilog c 239 1
chmod 666 /dev/hilog
mknod /dev/hwlog_exception   c 241 1
chmod 666 /dev/hwlog_exception
mknod /dev/watchdog c 10 130
chmod 666 /dev/watchdog
chmod 666 /dev/hdmi
chmod 666 /dev/mmz_userdev
chmod 777 /dev/i2c-0
chmod 666 /dev/sys
chmod 777 /dev/mem
chmod 666 /dev/vodev

# allow ping
echo 0 9999999 > /proc/sys/net/ipv4/ping_group_range

# remount root
mount -n -o remount,rw /